/PROG  PN51947509
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "51906028";
PROG_SIZE	= 3304;
CREATE		= DATE 13-08-31  TIME 14:28:06;
MODIFIED	= DATE 13-08-31  TIME 14:28:08;
FILE_NAME	= PNS0005;
VERSION		= 0;
LINE_COUNT	= 118;
MEMORY_SIZE	= 3768;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0005 ;
   7:  !  PART:  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:   ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100 BREAK    ;
  27:   ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON AND DI[8:P1 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  TIMER[3]=START ;
  53:  OVERRIDE=R[5:SPEED] ;
  54:J P[3:PICK APPROACH] 100% CNT100 ACC130    ;
  55:   ;
  56:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  57:  PAYLOAD[2] ;
  58:  CALL CHK_PICK    ;
  59:  MONITOR Z_CHECH ;
  60:J P[5:PICK DEPART] 100% CNT50 ACC100 TA R[20]sec,DO[5:TO RL1 DROP START]=PULSE,1.5sec    ;
  61:  DO[8:P1 PARTS OUT]=PULSE,1.5sec ;
  62:  LBL[27] ;
  63:  CALL CHECKPICK    ;
  64:  IF DI[9:VACUUM ON L]=OFF OR DI[11:VACUUM ON R]=OFF,JMP LBL[27] ;
  65:   ;
  66:J P[7:PICK CLEAR] 100% CNT100 ACC150    ;
  67:   ;
  68:  LBL[30:GOTO DROP POUNCE] ;
  69:J P[8:DROP POUNCE] 100% CNT100 ACC150 BREAK    ;
  70:   ;
  71:  TIMER[3]=STOP ;
  72:  LBL[40:AT DROP POUNCE] ;
  73:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  74:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
  75:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  76:  JMP LBL[40] ;
  77:   ;
  78:  LBL[50:MOVE DROP SNEAK] ;
  79:  TIMER[3]=START ;
  80:  OVERRIDE=R[5:SPEED] ;
  81:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  82:  LBL[51:DROP OR C-P-S] ;
  83:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  84:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  85:  JMP LBL[51] ;
  86:  JMP LBL[50] ;
  87:   ;
  88:  LBL[60:MOVE CLS-PRS-ACC] ;
  89:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  90:  PAUSE ;
  91:  JMP LBL[30] ;
  92:   ;
  93:  LBL[80:DROP ENABLED] ;
  94:  TIMER[3]=START ;
  95:  !PROCEED TO DROP ;
  96:  OVERRIDE=R[5:SPEED] ;
  97:J P[10:DROP APPROACH] 100% CNT100 ACC130    ;
  98:  MONITOR END Z_CHECH ;
  99:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 100:  DO[6:PART DROP COMPLETE]=PULSE,0.5sec ;
 101:  PAYLOAD[1] ;
 102:  CALL CHK_DROP    ;
 103:   ;
 104:J P[12:DROP DEPART] 100% CNT100 ACC150 DB   50.0mm,DO[7:PRESS STAMPING START]=PULSE,0.5sec    ;
 105:   ;
 106:J P[13:DROP CLEAR] 100% CNT100 ACC150    ;
 107:  !GOTO PICK POUNCE ;
 108:J P[2:PICK POUNCE] 100% CNT100 ACC150 BREAK    ;
 109:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 110:  JMP LBL[10] ;
 111:   ;
 112:  LBL[90:END OF CYCLE] ;
 113:  TIMER[1]=STOP ;
 114:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 115:J P[1:MIDDLE] 50% CNT100    ;
 116:  MOVE TO HOME    ;
 117:   ;
 118:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.456  mm,	Y =     -.007  mm,	Z = -1156.600  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2132.352  mm,	Y =  1663.136  mm,	Z =  -937.803  mm,
	W =   179.084 deg,	P =     -.394 deg,	R =   142.485 deg,
	E1=   142.451 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2623.867  mm,	Y =  3268.790  mm,	Z =  -945.669  mm,
	W =   179.458 deg,	P =    -1.029 deg,	R =    89.139 deg,
	E1=   195.903 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2623.903  mm,	Y =  3268.768  mm,	Z = -1121.571  mm,
	W =   179.459 deg,	P =    -1.028 deg,	R =    89.136 deg,
	E1=   195.902 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2621.910  mm,	Y =  3262.539  mm,	Z =  -860.284  mm,
	W =   179.454 deg,	P =    -1.022 deg,	R =    89.540 deg,
	E1=   195.497 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2130.066  mm,	Y =  1658.540  mm,	Z =  -809.489  mm,
	W =   179.086 deg,	P =     -.395 deg,	R =   142.541 deg,
	E1=   142.392 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2070.892  mm,	Y = -1166.298  mm,	Z =  -844.719  mm,
	W =   178.804 deg,	P =      .655 deg,	R =  -154.062 deg,
	E1=    78.889 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2224.739  mm,	Y = -1992.036  mm,	Z =  -845.861  mm,
	W =   178.999 deg,	P =     1.198 deg,	R =  -133.896 deg,
	E1=    58.695 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2654.795  mm,	Y = -3256.203  mm,	Z =  -840.000  mm,
	W =  -179.608 deg,	P =     2.004 deg,	R =   -90.595 deg,
	E1=    15.370 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2664.456  mm,	Y = -3256.233  mm,	Z = -1010.100  mm,
	W =  -179.606 deg,	P =     2.003 deg,	R =   -90.593 deg,
	E1=    15.370 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2664.456  mm,	Y = -3256.233  mm,	Z =  -937.620  mm,
	W =  -179.606 deg,	P =     2.003 deg,	R =   -90.593 deg,
	E1=    15.370 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2164.227  mm,	Y = -1683.069  mm,	Z =  -936.779  mm,
	W =   178.895 deg,	P =      .985 deg,	R =  -141.708 deg,
	E1=    66.519 deg
};
/END
